#include "cs32f0xx_int.h"
#include "mytim.h"
#include "main.h"

static uint16_t capture_value = 0;
extern uint16_t pulse1;

void NMI_Handler(void)
{
}

/**
  * @fn void HardFault_Handler(void)
  * @brief  This function handles Hard Fault exception.
  * @param  None
  * @return None
  */
void HardFault_Handler(void)
{
    /* Go to infinite loop when Hard Fault exception occurs */
    while (1)
    {
    }
}

/**
  * @fn void SVC_Handler(void)
  * @brief  This function handles SVCall exception.
  * @param  None
  * @return None
  */
void SVC_Handler(void)
{
}

/**
  * @fn void PendSV_Handler(void)
  * @brief  This function handles PendSVC exception.
  * @param  None
  * @return None
  */
void PendSV_Handler(void)
{
}

/**
  * @fn void SysTick_Handler(void)
  * @brief  This function handles SysTick Handler.
  * @param  None
  * @return None
  */
void SysTick_Handler(void)
{

}

void TIM3_IRQHandler(void)
{
	if (tim_interrupt_status_get(TIM3, TIM_INTR_UPDATE) != RESET)
	{
		tim_interrupt_status_clear(TIM3, TIM_INTR_UPDATE);
		gpio_trigger(GPIOA,GPIO_PIN_1);
	}
}



